import request from '@/utils/request'

// 查询代理账号列表
export function listAccount(query) {
  return request({
    url: '/proxy/account/list',
    method: 'get',
    params: query
  })
}

// 查询代理账号详细
export function getAccount(id) {
  return request({
    url: '/proxy/account/' + id,
    method: 'get'
  })
}

// 新增代理账号
export function addAccount(data) {
  return request({
    url: '/proxy/account',
    method: 'post',
    data: data
  })
}

// 修改代理账号
export function updateAccount(data) {
  return request({
    url: '/proxy/account',
    method: 'put',
    data: data
  })
}

export  function chargeFlow(data){
  return request({
    url: '/proxy/account/chargeFlow',
    method: 'post',
    data: data
  })
}

export  function reduceFlow(data){
  return request({
    url: '/proxy/account/reduceFlow',
    method: 'post',
    data: data
  })
}


// 删除代理账号
export function delAccount(id) {
  return request({
    url: '/proxy/account/' + id,
    method: 'delete'
  })
}



export  function proxyAccountList(){
  return request({
    url: '/proxy/account/proxyAccountList',
    method: 'post',
    data: '{}'
  })
}


export  function userList(){
  return request({
    url: '/proxy/account/userList',
    method: 'post',
    data: '{}'
  })
}



export  function flowCount(){
  return request({
    url: '/proxy/account/flowCount',
    method: 'post',
  })
}
